package com.hedl.classroom.service;

import com.hedl.classroom.base.exception.CommonResult;
import com.hedl.classroom.model.dto.BindTeachplanMediaDto;
import com.hedl.classroom.model.dto.SaveTeachplanDto;
import com.hedl.classroom.model.dto.TeachplanDto;
import com.hedl.classroom.model.po.Teachplan;
import com.hedl.classroom.model.po.TeachplanMedia;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 *课程计划管理相关接口
 */
public interface TeachplanService {

    /**
     * 查询某课程的课程计划，组成树型结构
     * @param courseId  //课程id
     * @return 课程内容
     */
    List<TeachplanDto> selectTreeNodes(Long courseId);

    /**
     * 新增/修改/保存课程计划
     * @param saveTeachplanDto
     */
    void saveTeachplan(SaveTeachplanDto saveTeachplanDto);

    /**
     * 指定id查询课程计划和媒资
     * @param id 课程计划id
     * @return 返回个数
     */
    CommonResult selectTeachplanByid(Long id);

    /**
     * 课程计划向上下移动
     * @param moveType
     * @param id
     */
    void orderByTeachplan(String moveType,Long id);

    /**
     * @description 教学计划绑定媒资
     * @param bindTeachplanMediaDto
     * @return com.xuecheng.content.model.po.TeachplanMedia
     * @author Mr.M
     * @date 2022/9/14 22:20
     */
    TeachplanMedia associationMedia(BindTeachplanMediaDto bindTeachplanMediaDto);

    /**
     * 指定删除媒资视频
     * @param teachplanId 课程id
     * @param mediaId 媒资id
     */
    void deleteTeachplanMedia(Long teachplanId, String mediaId);

    /**
     * 指定id查询
     * @param teachplanId 课程id
     * @return
     */
    Teachplan getTeachplan(Long teachplanId);
}
